function y = pred_cor(a, b, n, y0, f)
	% Intrari: a, b = intervalul de integrare
	%        n = numarul de puncte
	%        y0= conditia initiala
	%        f = functia de integrat y'=f(x,y)
	% Iesiri: y = tabloul aproximatiilor solutiei
  	y = RK4(a, b, n, y0, f);
  	h = (b-a) / n;
  	x0=a;
	x1 = a+h;
        x2 = a+2*h;
        y0 = y(1);
	y1 = y(2);
        y2 = y(3);
 	for i = 4 : n
   		x = a + (i-1) * h;
   		ypr = y2 + h * ( 23 * feval(f, x2, y2 ) - 6 * feval(f, x1, y1 ) + 5 * feval(f, x0, y0 ) ) / 12;
   		ycor = ypr +  h *(5* feval(f, x, ypr ) + 8 * feval(f, x2, y2 ) - feval(f, x1, y1 ) ) / 12;
   		y( i ) = ycor;
		y1 = y2;
	        y2 = ycor;
	        x0 = x1; 
                x1 = x2;
                x2 = x;
  	endfor
endfunction
